home *** CD-ROM | disk | FTP | other *** search
- /* */
- /* makes a helical path */
- /* still needs work */
- /* Ash Wyllie */
-
-
- address 'Imagine.1'
- displayrexxptr on
- call addlib('rexxmathlib.library',0,-30,0)
- call addlib('rexxreqtools.library',0,-30,0)
- unpick all
-
- pi = 3.14159
-
- radius = rtgetlong(50,'Radius')
- if ~rtresult then call done
- pitch = rtgetlong(10,'Pitch ')
- if ~rtresult then call done
- pitch = pitch * .25
- turns = rtgetlong( 3,'Turns ')
- if ~rtresult then call done
- name = rtgetstring('SP','Path name')
- if ~rtresult then call done
- name = upper(name)
- phi = 180 / pi * atan2(pitch , .5 * pi * radius)
- t = .5 * pi
- theta = -90
-
- say radius pitch turns
- do i=0 to (4*turns)
-
- addaxis
- pick
-
- attrib.objectname = name'.'i
- setattributes objectname
- tangle = t * i
- x = radius * cos(tangle)
- y = radius * sin(tangle)
- z= pitch * i
- theta = 90 + theta
-
- transform_alignment phi 0 theta
- transform_position x y z
-
- end
-
- unpick all
-
- multipickon
- do i = 0 to (4*turns)
- pick name'.'i
- end
- multipickoff
-
- makepath
-
- groupmode
- attrib.objectname = name
- setattributes objectname
-
- done:
- displayrexxptr off
- exit
-